(function() {
    angular.module('app').directive('sortDirective', [function() {
        return {
            restrict: 'A',
            replace: true,
            scope:{
            	// handel: '&',
            	sort: '='
            },
            template: "<span class=\"sort_icon\">\n" +
                "<i class=\"caret down icon cp\" ng-class=\"{'green-text':sort.sortIndex=='down'}\" ng-click=\"sort.handel('down')\"></i>\n"+
                "<i class=\"caret up icon cp\" ng-class=\"{'green-text':sort.sortIndex=='up'}\" ng-click=\"sort.handel('up')\"></i>\n" +
                "</span>\n",
            link: function(scope, iElement, iAttrs) {



            	console.log(scope.sort);

            	
            }
        };
    }])
})();
